/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javaseapp - Switch1
 * <p>Powered by webrx On 2021-07-29 17:20:48
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class For1 {
    public static void main(String[] args) {
        for (int i = 1; i <= 15; i++)
            System.out.printf("%03d\t", i);
        System.out.println();
        for (int i = 15; i >= 1; i -= 2) {
            System.out.printf("%03d\t", i);
        }
        //计算1+2+3+...+100 = ?
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum = sum + i;
        }
        System.out.println("\n1+2+3+...+100="+sum);
    }
}
